<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="/auth/templates/template.xhtml">
	<ui:define name="pageTitle">Painel Financeiro</ui:define>
	<ui:define name="body">
		<f:view>
			<p:growl id="messages" showDetail="true" autoUpdate="true"
				closable="true" />
			<h:form id="dados">

				<h:panelGrid cellspacing="10px" styleClass="center">
					<f:facet name="header">Painel Financeiro</f:facet>
					<h:panelGrid cellspacing="10px" columns="2">
						<p:barChart id="basic"
							value="#{despesasChartRSBean.barChartModel}" legendPosition="ne"
							title="Despesas" style="height:300px" />
						<h:panelGroup>
							<p:panel header="Despesas">
								<h:outputText id="txtSaldoDespesas"
									value="#{despesaRSBean.saldoDespesas}">
									<f:convertNumber currencyCode="BRL" minFractionDigits="2"
										type="currency" />
								</h:outputText>
							</p:panel>
							<p:panel header="Cartões Crédito">
								<h:outputText id="txtSaldoCartaoCompra"
									value="#{cartaoCreditoCompraBean.totalCompras}">
									<f:convertNumber currencyCode="BRL" minFractionDigits="2"
										type="currency" />
								</h:outputText>
							</p:panel>
							<p:panel header="Compras">
								<h:outputText id="txtSaldoCompra">
									<f:convertNumber currencyCode="BRL" minFractionDigits="2"
										type="currency" />
								</h:outputText>
							</p:panel>
						</h:panelGroup>
					</h:panelGrid>
				</h:panelGrid>
			</h:form>
		</f:view>
	</ui:define>
</ui:composition>
</html>